#!/usr/bin/env bash
# Test install --dry-run functionality

set -euo pipefail

# Test: Dry-run should show what would be installed without actually installing
assert_contains "mise install tiny@3.1.0 --dry-run 2>&1" "would install"

# Verify tiny is NOT actually installed
assert_fail "mise which tiny"

# Test: Dry-run should show already installed for existing tools
mise install jq@latest --force
assert_contains "mise install jq@latest --dry-run 2>&1" "already installed"

# Test: Dry-run should work with multiple tools
assert_contains "mise install tiny@3.1.0 shfmt@3.10.0 --dry-run 2>&1" "would install"

# Verify neither tool was actually installed
assert_fail "mise which tiny"
